package com.gdwstudy.enum_;

/**
 * @author 关道伟
 * @version 1.0
 * 自定义枚举
 */
public class Enumeration_ {
    public static void main(String[] args) {
        Season spring = Season.SPRING;
        System.out.println(spring);
    }
}

 class Season{
    private String name;
    private String Desc;//描述

    private Season(String name, String desc) {
        this.name = name;
        Desc = desc;
    }

    public String getName() {
        return name;
    }

    public String getDesc() {
        return Desc;
    }

    public static final Season SPRING = new Season("春天","温暖");
    public static final Season SUMMER = new Season("夏天","炎热");
    public static final Season AUTUMN = new Season("秋天","凉爽");
    public static final Season WINTER = new Season("冬天","寒冷");

     @Override
     public String toString() {
         return "Season{" +
                 "name='" + name + '\'' +
                 ", Desc='" + Desc + '\'' +
                 '}';
     }
 }
